The inventions disclosed herein relate to the field of graphic processing. More specifically, but not by way of limitation, it relates to memory allocation techniques for use by graphic processing units in rendering graphic data for display.
Computers and other computational devices typically have at least one programmable processing element that is generally known as a central processing unit (CPU). They frequently also have other programmable processors that are used for specialized processing of various types, such as graphic processing operations which are typically called graphic processing units (GPUs). GPUs generally comprise multiple cores or processing elements designed for executing the same instruction on parallel data streams, making them more effective than general-purpose CPUs for algorithms in which processing of large blocks of data is done in parallel. In general, a CPU functions as the host and hands-off specialized parallel tasks to the GPUs.
Vendors and standards organizations have created application programming interfaces (APIs) that make graphic data-parallel tasks easier to program because of the high level of developer programming interaction. Graphic application executed on the computational devices convey description of a graphic scene by invoking application programming interface (API) calls to GPUs in order to render an image for display.
Sometimes several rendering passes may be employed prior to committing a frame buffer's content for display. The multiple rendering passes are employed to incrementally move the data toward its displayable format. For example, effects such as lighting, shadows, reflections, specular illumination may be sequentially applied to the same graphic element. An on-chip memory may be used by a GPU to store the intermediate results temporarily while the data is also backed up in the system memory. Later rendering passes in a sequence of rendering passes may access the intermediate results stored in the system memory for further computation. As the foregoing application demonstrates, a more efficient memory allocation approach is needed in rendering graphic data by GPUs.